<?php

/**
 * Redirige vers la page captcha
 *
 * @author Cyril Souti
 * @version 1.12
 * @package plugins
 *
 */
class Plugins_CaptchaPlugin extends Plugins_StrategyPlugin
{
	const ROUTE_CAPTCHA = 'captcha';
	const PARAMETRE_CAPTCHA = 'captcha';
	const CONTROLLER_CAPTCHA_DEFAULT = 'captcha';

	/**
	 * (non-PHPdoc)
	 * @see Zend/Controller/Plugin/Zend_Controller_Plugin_Abstract#routeStartup($request)
	 *
	 * Déclare la route pour le captcha
	 */
	public function routeStartup(Zend_Controller_Request_Abstract $request)
	{
		$front = Zend_Controller_Front::getInstance();
		$router = $front->getRouter();
		$router->addRoute(self::ROUTE_CAPTCHA, new Zend_Controller_Router_Route(self::PARAMETRE_CAPTCHA.'/:id/:type/:stringLength/:sizeFont/:random',array("controller" => self::CONTROLLER_CAPTCHA_DEFAULT, "action" => "index", "module" => "default",)));
	}
}